package oauth.signpost.signature;

import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;

import oauth.signpost.OAuth;
import oauth.signpost.http.HttpParameters;
import oauth.signpost.http.HttpRequest;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;


/**
 * Writes to the HTTP Authorization header field.
 * 
 * @author Matthias Kaeppler
 */
public class UrlParaSigningStrategy implements SigningStrategy {

    private static final long serialVersionUID = 1L;
    
    public String writeSignature(String signature, HttpRequest request,
            HttpParameters requestParameters) {
                        
        requestParameters.put(OAuth.OAUTH_SIGNATURE, signature, true);
        String newURL = new SignatureBaseString(request, requestParameters).generateUrl();
        return newURL;
  
    }  

}
 